package com.stlm2.dems.user.entity;

/**
 * Created by apple on 2017/5/21.
 */
public enum UserState {
    Normal(1) {
        public String toString() {
            return "正常";
        }
    },
    Invalid(4) {
        public String toString() {
            return "无效";
        }
    };

    private final int val;

    UserState(int n) {
        val = n;
    }

    public int getIntValue() {
        return val;
    }

    public static UserState getByIntValue(int n) {
        switch (n) {
            case 1:
                return Normal;
            case 4:
                return Invalid;
            default:
                return null;
        }
    }
}
